$(document).ready(function(){ 

    $(".popup").live('click',function(){
        $("#media-modal").modal({

            opacity: 70,
            containerCss:{
                background: '#FFFFFF',
                border: 0,
                padding: 0
            },
            overlayCss:{
                background: '#000000'
            },
            position: ["20%",] ,
            onOpen: function (dialog) {
                dialog.overlay.fadeIn('slow', function () {
                    dialog.data.hide();
                    dialog.container.fadeIn('slow', function () {
                        dialog.data.slideDown('slow',function(){
                            $('.zmodalClose').fadeIn('fast').delay(118000);
                        });
                    });
                });

            },
            closeClass: 'zmodalClose'
        });
        $('.zmodalClose').css({
            'margin-right':'0',
            'margin-top':'0',
            'display':'none'
        }); 
    }) 
});